<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>留言板</title>
</head>
<body>
        <center><h1>留言</h1></center>

        <center>
            <form action="{{ url_for('index') }}" method="POST">
                用户名: <input type="text" name="say_user"><br><br>
                留言标题: <input type="text" name="say_title"><br><br>
                留言内容: <input type="text" name="say"><br><br>
                <button>提交留言</button>
            </form>
        </center>

    <center>
        <table border="2">
            <thead>
            <tr>
                <th>标题</th>
                <th>内容</th>
                <th>用户</th>
                <th>留言时间</th>
            </tr>
            </thead>

            <tbody>

            {% for say in says %}
                <tr>
                    <td>{{ say['title'] }}</td>
                    <td>{{ say['text'] }}</td>
                    <td>{{ say['user'] }}</td>
                    <td>{{ say['date'] }}</td>
                </tr>
            {% endfor %}

            </tbody>
        </table>
    </center>
</body>
</html>